package com.wgchao.amc.repository.base;

import com.wgchao.amc.entity.base.SysBaseGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @作者  wgchao
 * @时间 2019-10-19 
 * @用途  
 */
@Repository
public interface SysBaseGroupRepository  extends JpaRepository<SysBaseGroup, Long>, JpaSpecificationExecutor<SysBaseGroup> {

    List<SysBaseGroup> findAllByParGroupAndDelIsFalse(Long groupId);

    SysBaseGroup findFirstByGroupIdAndDelIsFalse(Long groupId);

    List<SysBaseGroup> findAllByParGroup(Long parGroup);

    List<SysBaseGroup> findAllByAgencyCodeAndDelIsFalse(String agencyCode);
}
